package org.example;

import java.math.BigDecimal;
import java.time.Duration;

public class CalculateFee {

    public static BigDecimal calculateFee(long timeDuration){
        if (timeDuration <= 0) return BigDecimal.valueOf(0);
        if (timeDuration <= 20) return BigDecimal.valueOf(timeDuration * 0.05);
        else {
            return BigDecimal.valueOf(1 + (timeDuration - 20) * 0.1);
        }
    }
}
